<template>
  <component v-if="component" :is="component.component" :data="component"></component>
</template>

<script setup>
import { useDragStore } from '@/store/modules/drag';
import { loadComponentConfig, componentsConfig } from '@/elements/index';

const dragStore = useDragStore();

/**
 *
 */
const component = computed(() => {
  dragStore.data.select.component = loadComponentConfig(dragStore.data.select.type);
  return dragStore.data.select;
});
</script>
